<?php /* Smarty version 2.6.12, created on 2008-10-30 12:48:45
         compiled from admin/main/pages.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'admin/main/pages.tpl', 57, false),array('modifier', 'escape', 'admin/main/pages.tpl', 60, false),array('modifier', 'truncate', 'admin/main/pages.tpl', 60, false),array('modifier', 'strip_tags', 'admin/main/pages.tpl', 112, false),)), $this); ?>
<?php func_load_lang($this, "admin/main/pages.tpl","lbl_static_pages,txt_static_pages_top_text,lbl_embedded_level,lbl_enabled,lbl_disabled,lbl_preview,lbl_check_all,lbl_uncheck_all,lbl_pos,lbl_page_title,lbl_page_th_show_in_menu,lbl_status,lbl_parse_smarty_tags_in_embedded_pages,lbl_delete_selected,lbl_update,txt_no_embedded_pages,lbl_add_new_,lbl_preview,lbl_root_level,lbl_check_all,lbl_uncheck_all,lbl_pos,lbl_page_title,lbl_delete_selected,lbl_update,txt_no_root_pages,lbl_add_new_,lbl_find_pages,lbl_static_pages"); ?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "page_title.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['lbl_static_pages'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<?php echo $this->_tpl_vars['lng']['txt_static_pages_top_text']; ?>


<br /><br />

<?php ob_start(); ?>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "main/language_selector.tpl", 'smarty_include_vars' => array('script' => "pages.php?")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<script type="text/javascript" language="JavaScript 1.2">
<!--
function mark_all_e(status) {
    var fieldname;
<?php unset($this->_sections['pg']);
$this->_sections['pg']['name'] = 'pg';
$this->_sections['pg']['loop'] = is_array($_loop=$this->_tpl_vars['pages']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['pg']['show'] = true;
$this->_sections['pg']['max'] = $this->_sections['pg']['loop'];
$this->_sections['pg']['step'] = 1;
$this->_sections['pg']['start'] = $this->_sections['pg']['step'] > 0 ? 0 : $this->_sections['pg']['loop']-1;
if ($this->_sections['pg']['show']) {
    $this->_sections['pg']['total'] = $this->_sections['pg']['loop'];
    if ($this->_sections['pg']['total'] == 0)
        $this->_sections['pg']['show'] = false;
} else
    $this->_sections['pg']['total'] = 0;
if ($this->_sections['pg']['show']):

            for ($this->_sections['pg']['index'] = $this->_sections['pg']['start'], $this->_sections['pg']['iteration'] = 1;
                 $this->_sections['pg']['iteration'] <= $this->_sections['pg']['total'];
                 $this->_sections['pg']['index'] += $this->_sections['pg']['step'], $this->_sections['pg']['iteration']++):
$this->_sections['pg']['rownum'] = $this->_sections['pg']['iteration'];
$this->_sections['pg']['index_prev'] = $this->_sections['pg']['index'] - $this->_sections['pg']['step'];
$this->_sections['pg']['index_next'] = $this->_sections['pg']['index'] + $this->_sections['pg']['step'];
$this->_sections['pg']['first']      = ($this->_sections['pg']['iteration'] == 1);
$this->_sections['pg']['last']       = ($this->_sections['pg']['iteration'] == $this->_sections['pg']['total']);
 if ($this->_tpl_vars['pages'][$this->_sections['pg']['index']]['level'] == 'E'): ?>
    fieldname = 'posted_data['+'<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
'+'][to_delete]';
    document.pagesform.elements[fieldname].checked = status;
<?php endif;  endfor; endif; ?>
}

function mark_all_r(status) {
    var fieldname;
<?php unset($this->_sections['pg']);
$this->_sections['pg']['name'] = 'pg';
$this->_sections['pg']['loop'] = is_array($_loop=$this->_tpl_vars['pages']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['pg']['show'] = true;
$this->_sections['pg']['max'] = $this->_sections['pg']['loop'];
$this->_sections['pg']['step'] = 1;
$this->_sections['pg']['start'] = $this->_sections['pg']['step'] > 0 ? 0 : $this->_sections['pg']['loop']-1;
if ($this->_sections['pg']['show']) {
    $this->_sections['pg']['total'] = $this->_sections['pg']['loop'];
    if ($this->_sections['pg']['total'] == 0)
        $this->_sections['pg']['show'] = false;
} else
    $this->_sections['pg']['total'] = 0;
if ($this->_sections['pg']['show']):

            for ($this->_sections['pg']['index'] = $this->_sections['pg']['start'], $this->_sections['pg']['iteration'] = 1;
                 $this->_sections['pg']['iteration'] <= $this->_sections['pg']['total'];
                 $this->_sections['pg']['index'] += $this->_sections['pg']['step'], $this->_sections['pg']['iteration']++):
$this->_sections['pg']['rownum'] = $this->_sections['pg']['iteration'];
$this->_sections['pg']['index_prev'] = $this->_sections['pg']['index'] - $this->_sections['pg']['step'];
$this->_sections['pg']['index_next'] = $this->_sections['pg']['index'] + $this->_sections['pg']['step'];
$this->_sections['pg']['first']      = ($this->_sections['pg']['iteration'] == 1);
$this->_sections['pg']['last']       = ($this->_sections['pg']['iteration'] == $this->_sections['pg']['total']);
 if ($this->_tpl_vars['pages'][$this->_sections['pg']['index']]['level'] == 'R'): ?>
    fieldname = 'posted_data['+'<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
'+'][to_delete]';
    document.pagesform.elements[fieldname].checked = status;
<?php endif;  endfor; endif; ?>
}

-->
</script>

<form action="pages.php" method="post" name="pagesform">
<input type="hidden" name="mode" value="update" />
<input type="hidden" name="sec" value="E" />

<table cellpadding="3" cellspacing="1" width="100%">

<tr>
	<td colspan="6"><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "main/subheader.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['lbl_embedded_level'],'class' => 'grey')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></td>
</tr>

<?php if ($this->_tpl_vars['pages']): ?>

<?php ob_start(); ?>

<?php unset($this->_sections['pg']);
$this->_sections['pg']['name'] = 'pg';
$this->_sections['pg']['loop'] = is_array($_loop=$this->_tpl_vars['pages']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['pg']['show'] = true;
$this->_sections['pg']['max'] = $this->_sections['pg']['loop'];
$this->_sections['pg']['step'] = 1;
$this->_sections['pg']['start'] = $this->_sections['pg']['step'] > 0 ? 0 : $this->_sections['pg']['loop']-1;
if ($this->_sections['pg']['show']) {
    $this->_sections['pg']['total'] = $this->_sections['pg']['loop'];
    if ($this->_sections['pg']['total'] == 0)
        $this->_sections['pg']['show'] = false;
} else
    $this->_sections['pg']['total'] = 0;
if ($this->_sections['pg']['show']):

            for ($this->_sections['pg']['index'] = $this->_sections['pg']['start'], $this->_sections['pg']['iteration'] = 1;
                 $this->_sections['pg']['iteration'] <= $this->_sections['pg']['total'];
                 $this->_sections['pg']['index'] += $this->_sections['pg']['step'], $this->_sections['pg']['iteration']++):
$this->_sections['pg']['rownum'] = $this->_sections['pg']['iteration'];
$this->_sections['pg']['index_prev'] = $this->_sections['pg']['index'] - $this->_sections['pg']['step'];
$this->_sections['pg']['index_next'] = $this->_sections['pg']['index'] + $this->_sections['pg']['step'];
$this->_sections['pg']['first']      = ($this->_sections['pg']['iteration'] == 1);
$this->_sections['pg']['last']       = ($this->_sections['pg']['iteration'] == $this->_sections['pg']['total']);
?>

<?php if ($this->_tpl_vars['pages'][$this->_sections['pg']['index']]['level'] == 'E'): ?>

<?php $this->assign('embedded', 'found'); ?>

<tr<?php echo smarty_function_cycle(array('name' => 'embed','values' => ", class='TableSubHead'"), $this);?>
>
<td><input type="checkbox" name="posted_data[<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
][to_delete]" value="<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
" /></td>
<td><input type="text" name="posted_data[<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
][orderby]" value="<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['orderby']; ?>
" size="5" /></td>
<td><b><a href="pages.php?pageid=<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
" title="<?php echo ((is_array($_tmp=$this->_tpl_vars['pages'][$this->_sections['pg']['index']]['filename'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"><?php echo ((is_array($_tmp=$this->_tpl_vars['pages'][$this->_sections['pg']['index']]['title'])) ? $this->_run_mod_handler('truncate', true, $_tmp, '30', "...") : smarty_modifier_truncate($_tmp, '30', "...")); ?>
</a></b></td>
<td align="center"><input type="checkbox" name="posted_data[<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
][show_in_menu]" value="Y"<?php if ($this->_tpl_vars['pages'][$this->_sections['pg']['index']]['show_in_menu'] == 'Y'): ?> checked="checked"<?php endif; ?> /></td>
<td><select name="posted_data[<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
][active]">
<option value="Y"<?php if ($this->_tpl_vars['pages'][$this->_sections['pg']['index']]['active'] == 'Y'): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lng']['lbl_enabled']; ?>
</option>
<option value="N"<?php if ($this->_tpl_vars['pages'][$this->_sections['pg']['index']]['active'] == 'N'): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lng']['lbl_disabled']; ?>
</option>
</select>
</td>
<td align="right"><a href="<?php echo $this->_tpl_vars['catalogs']['customer']; ?>
/pages.php?pageid=<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
&amp;mode=preview" target="previewpage"><?php echo $this->_tpl_vars['lng']['lbl_preview']; ?>
</a></td>
</tr>

<?php endif; ?>

<?php endfor; endif; ?>

<?php $this->_smarty_vars['capture']['embedpages'] = ob_get_contents(); ob_end_clean(); ?>

<?php endif; ?>

<?php if ($this->_tpl_vars['embedded']): ?>

<tr>
<td colspan="6"><div style="line-height: 170%;"><a href="javascript: mark_all_e(true);"><?php echo $this->_tpl_vars['lng']['lbl_check_all']; ?>
</a> / <a href="javascript: mark_all_e(false);"><?php echo $this->_tpl_vars['lng']['lbl_uncheck_all']; ?>
</a></div></td>
</tr>

<?php endif; ?>

<tr class="TableHead">
	<td width="10">&nbsp;</td>
	<td width="10%"><?php echo $this->_tpl_vars['lng']['lbl_pos']; ?>
</td>
	<td width="60%"><?php echo $this->_tpl_vars['lng']['lbl_page_title']; ?>
</td>
	<td width="10%"><?php echo $this->_tpl_vars['lng']['lbl_page_th_show_in_menu']; ?>
</td>
	<td width="20%" colspan="2"><?php echo $this->_tpl_vars['lng']['lbl_status']; ?>
</td>
</tr>

<?php if ($this->_tpl_vars['embedded']): ?>

<?php echo $this->_smarty_vars['capture']['embedpages']; ?>


<tr>
<td>&nbsp;</td>
<td colspan="5"><hr />
<table cellpadding="0" cellspacing="0">
<tr>
<td width="5"><input type="checkbox" id="parse_smarty_tags" name="parse_smarty_tags" value="Y"<?php if ($this->_tpl_vars['config']['General']['parse_smarty_tags'] == 'Y'): ?> checked="checked"<?php endif; ?> /></td>
<td><label for="parse_smarty_tags"><?php echo $this->_tpl_vars['lng']['lbl_parse_smarty_tags_in_embedded_pages']; ?>
</label></td>
</tr>
</table>
</td>
</tr>

<tr>
	<td colspan="6" class="SubmitBox">
	<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_delete_selected'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: submitForm(this, 'delete');" />
	<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_update'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: submitForm(this, 'update');" />
	</td>
</tr>

<?php else: ?>

<tr>
<td align="center" colspan="6"><?php echo $this->_tpl_vars['lng']['txt_no_embedded_pages']; ?>
</td>
</tr>

<?php endif; ?>

<tr>
	<td colspan="6" class="SubmitBox">
	<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_add_new_'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: self.location='pages.php?level=E&amp;pageid=0';" />
	</td>
</tr>

<?php if ($this->_tpl_vars['pages']): ?>

<?php ob_start(); ?>

<?php unset($this->_sections['pg']);
$this->_sections['pg']['name'] = 'pg';
$this->_sections['pg']['loop'] = is_array($_loop=$this->_tpl_vars['pages']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['pg']['show'] = true;
$this->_sections['pg']['max'] = $this->_sections['pg']['loop'];
$this->_sections['pg']['step'] = 1;
$this->_sections['pg']['start'] = $this->_sections['pg']['step'] > 0 ? 0 : $this->_sections['pg']['loop']-1;
if ($this->_sections['pg']['show']) {
    $this->_sections['pg']['total'] = $this->_sections['pg']['loop'];
    if ($this->_sections['pg']['total'] == 0)
        $this->_sections['pg']['show'] = false;
} else
    $this->_sections['pg']['total'] = 0;
if ($this->_sections['pg']['show']):

            for ($this->_sections['pg']['index'] = $this->_sections['pg']['start'], $this->_sections['pg']['iteration'] = 1;
                 $this->_sections['pg']['iteration'] <= $this->_sections['pg']['total'];
                 $this->_sections['pg']['index'] += $this->_sections['pg']['step'], $this->_sections['pg']['iteration']++):
$this->_sections['pg']['rownum'] = $this->_sections['pg']['iteration'];
$this->_sections['pg']['index_prev'] = $this->_sections['pg']['index'] - $this->_sections['pg']['step'];
$this->_sections['pg']['index_next'] = $this->_sections['pg']['index'] + $this->_sections['pg']['step'];
$this->_sections['pg']['first']      = ($this->_sections['pg']['iteration'] == 1);
$this->_sections['pg']['last']       = ($this->_sections['pg']['iteration'] == $this->_sections['pg']['total']);
?>

<?php if ($this->_tpl_vars['pages'][$this->_sections['pg']['index']]['level'] == 'R'): ?>

<?php $this->assign('root', 'found'); ?>


<tr<?php echo smarty_function_cycle(array('name' => 'root','values' => ", class='TableSubHead'"), $this);?>
>
	<td>
	<input type="hidden" name="pages_array[<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
][active]" value="Y" />
	<input type="hidden" name="posted_data[<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
][show_in_menu]" value="" />
	<input type="checkbox" name="posted_data[<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
][to_delete]" value="<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
" />
	</td>
	<td><input type="text" name="posted_data[<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
][orderby]" value="<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['orderby']; ?>
" size="5" /></td>
	<td colspan="3"><b><a href="pages.php?pageid=<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['pageid']; ?>
" title="<?php echo ((is_array($_tmp=$this->_tpl_vars['pages'][$this->_sections['pg']['index']]['filename'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"><?php echo ((is_array($_tmp=$this->_tpl_vars['pages'][$this->_sections['pg']['index']]['title'])) ? $this->_run_mod_handler('truncate', true, $_tmp, '30', "...") : smarty_modifier_truncate($_tmp, '30', "...")); ?>
</a></b></td>
	<td align="right"><a href="<?php echo $this->_tpl_vars['xcart_web_dir']; ?>
/<?php echo $this->_tpl_vars['pages'][$this->_sections['pg']['index']]['filename']; ?>
" target="previewpage"><?php echo $this->_tpl_vars['lng']['lbl_preview']; ?>
</a></td>
</tr>

<?php endif; ?>

<?php endfor; endif; ?>

<?php $this->_smarty_vars['capture']['rootpages'] = ob_get_contents(); ob_end_clean(); ?>

<?php endif; ?>

<tr>
<td colspan="6"><br /><br /><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "main/subheader.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['lbl_root_level'],'class' => 'grey')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></td>
</tr>

<?php if ($this->_tpl_vars['root']): ?>

<tr>
<td colspan="6"><div style="line-height: 170%;"><a href="javascript:mark_all_r(true);"><?php echo $this->_tpl_vars['lng']['lbl_check_all']; ?>
</a> / <a href="javascript:mark_all_r(false);"><?php echo $this->_tpl_vars['lng']['lbl_uncheck_all']; ?>
</a></div></td>
</tr>

<?php endif; ?>

<tr class="TableHead">
<td>&nbsp;</td>
<td><?php echo $this->_tpl_vars['lng']['lbl_pos']; ?>
</td>
<td colspan="4"><?php echo $this->_tpl_vars['lng']['lbl_page_title']; ?>
</td>
</tr>


<?php if ($this->_tpl_vars['root']): ?>

<?php echo $this->_smarty_vars['capture']['rootpages']; ?>


<tr>
	<td colspan="6" class="SubmitBox">
	<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_delete_selected'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: document.pagesform.sec.value='R'; submitForm(this, 'delete');" />
	<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_update'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: document.pagesform.sec.value='R'; submitForm(this, 'update');" />
	</td>
</tr>

<?php else: ?>

<tr>
<td align="center" colspan="6"><?php echo $this->_tpl_vars['lng']['txt_no_root_pages']; ?>
</td>
</tr>

<?php endif; ?>

<tr>
<td colspan="6" class="SubmitBox">
<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_add_new_'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: self.location='pages.php?level=R&amp;pageid=0';" />

<br /><br />

<div align="right"><input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_find_pages'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: submitForm(this, 'check');" /></div>
</td>
</tr>

</table>
</form>

<?php $this->_smarty_vars['capture']['dialog'] = ob_get_contents(); ob_end_clean();  $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "dialog.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['lbl_static_pages'],'content' => $this->_smarty_vars['capture']['dialog'],'extra' => 'width="100%"')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
